3.456 \(\int \cot ^3(e+f x) (a+b \sec ^3(e+f x)) \, dx\)

Optimal. Leaf size=72 \[ -\frac {(2 a-b) \log (1-\cos (e+f x))}{4 f}-\frac {(2 a+b) \log (\cos (e+f x)+1)}{4 f}-\frac {\csc ^2(e+f x) (a+b \cos (e+f x))}{2 f} \]

[Out]

-1/2*(a+b*cos(f*x+e))*csc(f*x+e)^2/f-1/4*(2*a-b)*ln(1-cos(f*x+e))/f-1/4*(2*a+b)*ln(1+cos(f*x+e))/f

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4138, 1814, 633, 31} \[ -\frac {(2 a-b) \log (1-\cos (e+f x))}{4 f}-\frac {(2 a+b) \log (\cos (e+f x)+1)}{4 f}-\frac {\csc ^2(e+f x) (a+b \cos (e+f x))}{2 f} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^3*(a + b*Sec[e + f*x]^3),x]

[Out]

-((a + b*Cos[e + f*x])*Csc[e + f*x]^2)/(2*f) - ((2*a - b)*Log[1 - Cos[e + f*x]])/(4*f) - ((2*a + b)*Log[1 + Co
s[e + f*x]])/(4*f)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 1814

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[((a
*g - b*f*x)*(a + b*x^2)^(p + 1))/(2*a*b*(p + 1)), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rule 4138

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> Module[{ff =
 FreeFactors[Cos[e + f*x], x]}, -Dist[(f*ff^(m + n*p - 1))^(-1), Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*
(ff*x)^n)^p)/x^(m + n*p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n] && IntegerQ[p]

Rubi steps

\begin {align*} \int \cot ^3(e+f x) \left (a+b \sec ^3(e+f x)\right ) \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {b+a x^3}{\left (1-x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {(a+b \cos (e+f x)) \csc ^2(e+f x)}{2 f}+\frac {\operatorname {Subst}\left (\int \frac {-b+2 a x}{1-x^2} \, dx,x,\cos (e+f x)\right )}{2 f}\\ &=-\frac {(a+b \cos (e+f x)) \csc ^2(e+f x)}{2 f}+\frac {(2 a-b) \operatorname {Subst}\left (\int \frac {1}{1-x} \, dx,x,\cos (e+f x)\right )}{4 f}+\frac {(2 a+b) \operatorname {Subst}\left (\int \frac {1}{-1-x} \, dx,x,\cos (e+f x)\right )}{4 f}\\ &=-\frac {(a+b \cos (e+f x)) \csc ^2(e+f x)}{2 f}-\frac {(2 a-b) \log (1-\cos (e+f x))}{4 f}-\frac {(2 a+b) \log (1+\cos (e+f x))}{4 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.01, size = 114, normalized size = 1.58 \[ -\frac {a \left (\cot ^2(e+f x)+2 \log (\tan (e+f x))+2 \log (\cos (e+f x))\right )}{2 f}-\frac {b \csc ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {b \sec ^2\left (\frac {1}{2} (e+f x)\right )}{8 f}+\frac {b \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f}-\frac {b \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^3*(a + b*Sec[e + f*x]^3),x]

[Out]

-1/8*(b*Csc[(e + f*x)/2]^2)/f - (b*Log[Cos[(e + f*x)/2]])/(2*f) + (b*Log[Sin[(e + f*x)/2]])/(2*f) - (a*(Cot[e
+ f*x]^2 + 2*Log[Cos[e + f*x]] + 2*Log[Tan[e + f*x]]))/(2*f) + (b*Sec[(e + f*x)/2]^2)/(8*f)

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 99, normalized size = 1.38 \[ \frac {2 \, b \cos \left (f x + e\right ) - {\left ({\left (2 \, a + b\right )} \cos \left (f x + e\right )^{2} - 2 \, a - b\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - {\left ({\left (2 \, a - b\right )} \cos \left (f x + e\right )^{2} - 2 \, a + b\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 2 \, a}{4 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3*(a+b*sec(f*x+e)^3),x, algorithm="fricas")

[Out]

1/4*(2*b*cos(f*x + e) - ((2*a + b)*cos(f*x + e)^2 - 2*a - b)*log(1/2*cos(f*x + e) + 1/2) - ((2*a - b)*cos(f*x
+ e)^2 - 2*a + b)*log(-1/2*cos(f*x + e) + 1/2) + 2*a)/(f*cos(f*x + e)^2 - f)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3*(a+b*sec(f*x+e)^3),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)2/f*(((1-cos(f*x+e
xp(1)))/(1+cos(f*x+exp(1)))*b-(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*a)/16+(-2*(1-cos(f*x+exp(1)))/(1+cos(f*x
+exp(1)))*b+4*(1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))*a-b-a)*1/16/(1-cos(f*x+exp(1)))*(1+cos(f*x+exp(1)))+a/2*
ln(abs((1-cos(f*x+exp(1)))/(1+cos(f*x+exp(1)))+1))+(b-2*a)/8*ln(abs(1-cos(f*x+exp(1)))/abs(1+cos(f*x+exp(1))))
)

________________________________________________________________________________________

maple [A]  time = 1.10, size = 69, normalized size = 0.96 \[ -\frac {a \left (\cot ^{2}\left (f x +e \right )\right )}{2 f}-\frac {a \ln \left (\sin \left (f x +e \right )\right )}{f}-\frac {b \csc \left (f x +e \right ) \cot \left (f x +e \right )}{2 f}+\frac {b \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^3*(a+b*sec(f*x+e)^3),x)

[Out]

-1/2*a*cot(f*x+e)^2/f-a*ln(sin(f*x+e))/f-1/2/f*b*csc(f*x+e)*cot(f*x+e)+1/2/f*b*ln(csc(f*x+e)-cot(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 62, normalized size = 0.86 \[ -\frac {{\left (2 \, a + b\right )} \log \left (\cos \left (f x + e\right ) + 1\right ) + {\left (2 \, a - b\right )} \log \left (\cos \left (f x + e\right ) - 1\right ) - \frac {2 \, {\left (b \cos \left (f x + e\right ) + a\right )}}{\cos \left (f x + e\right )^{2} - 1}}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^3*(a+b*sec(f*x+e)^3),x, algorithm="maxima")

[Out]

-1/4*((2*a + b)*log(cos(f*x + e) + 1) + (2*a - b)*log(cos(f*x + e) - 1) - 2*(b*cos(f*x + e) + a)/(cos(f*x + e)
^2 - 1))/f

________________________________________________________________________________________

mupad [B]  time = 4.65, size = 86, normalized size = 1.19 \[ \frac {a\,\ln \left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}{f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a}{8}-\frac {b}{8}\right )}{f}-\frac {{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a}{8}+\frac {b}{8}\right )}{f}-\frac {\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (a-\frac {b}{2}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^3*(a + b/cos(e + f*x)^3),x)

[Out]

(a*log(tan(e/2 + (f*x)/2)^2 + 1))/f - (tan(e/2 + (f*x)/2)^2*(a/8 - b/8))/f - (cot(e/2 + (f*x)/2)^2*(a/8 + b/8)
)/f - (log(tan(e/2 + (f*x)/2))*(a - b/2))/f

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec ^{3}{\left (e + f x \right )}\right ) \cot ^{3}{\left (e + f x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**3*(a+b*sec(f*x+e)**3),x)

[Out]

Integral((a + b*sec(e + f*x)**3)*cot(e + f*x)**3, x)

________________________________________________________________________________________